using TestCases.CompareAssert.Core.Interfaces;

namespace TestCases.CompareAssert.Core.Comparers.Generics
{
    public class GenericCompositionItem : IResultProvider
    {
        private readonly IResultBuilder _builder;
        private readonly object _originalArgs;
        private readonly string _originalMessage;

        public GenericCompositionItem(IResultBuilder builder)
        {
            _builder = builder;
            _originalMessage = _builder.GetMessage();
            _originalArgs = _builder.GetArgs();
        }

        public string OriginalMessage 
        { 
            get
            {
                return _originalMessage;    
            } 
        }
        
        public object OriginalArgs 
        { 
            get
            {
                return _originalArgs;    
            } 
        }        

        public CompareStatus GetStatus()
        {
            return _builder.GetStatus();
        }

        public ICompareResult GetResult()
        {
            return _builder.GetResult();
        }
    }
}